home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / perl5 / Sys::Hostname.z / Sys::Hostname
Encoding:
Text File  |  1998-10-30  |  1.1 KB  |  67 lines

  1.  
  2.  
  3.  
  4. SSSSyyyyssss::::::::HHHHoooossssttttnnnnaaaammmmeeee((((3333))))                                              SSSSyyyyssss::::::::HHHHoooossssttttnnnnaaaammmmeeee((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Sys::Hostname - Try every conceivable way to get hostname
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.          use Sys::Hostname;
  13.          $host = hostname;
  14.  
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      Attempts several methods of getting the system hostname and then caches
  18.      the result.  It tries syscall(SYS_gethostname), `hostname`, `uname -n`,
  19.      and the file /_c_o_m/_h_o_s_t.  If all that fails it croaks.
  20.  
  21.      All nulls, returns, and newlines are removed from the result.
  22.  
  23. AAAAUUUUTTTTHHHHOOOORRRR
  24.      David Sundstrom <_s_u_n_d_s@_a_s_i_c_t_e_s_t._s_c._t_i._c_o_m>
  25.  
  26.      Texas Instruments
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.